700"88vHH(FG(HH(d'@   : hpJmm  :       Rl2n:J   GH  Rl2n:J          &Adobe Photoshop Path Resource Format  Mark Hamburg  Adobe Systems, Inc.  &Copyright 1991. All rights reserved.    Photoshop stores the paths saved with an image in the resource fork of the image file. This document describes how to interpret and modify those paths.    !I. Photoshop stores its paths as resources of type 8BIM with IDs in the range 2000 through 2998. Photoshop stores other information using resources of type 8BIM so it is important to pay attention to the IDs. The name of the resource is the name given to the path when it was saved.    II. If the file contains a resource of type 8BIM with an ID of 2999, then this resources contains a Pascal-style string containing the name of the clipping path to use with this image when saving it as an EPS file.    LIII. All points used in defining a path are stored in the following format:     TYPE   TSPoint =   RECORD   v, h : LONGINT   END; { TSPoint }    Or for you C programmers:     typedef struct TSPoint   {   long v, h;   }   TSPoint;    tThe two components are fixed point numbers with 8 bits before the binary point and 24 bits after the binary point. We insist on leaving three guard bits in the points to eliminate most concerns over arithmetic overflow. Hence, the range for each component is $F0000000 to $0FFFFFFF representing a range of 16 to 16. We include the lower bound but not the upper bound.    MWe use such a limited range because we express the points relative to the image size. The vertical component is given with respect to the image height and the horizontal component is given with respect to the image width. <0,0> represents the top-left corner of the image; <1,1> (<$01000000,$01000000>) represents the bottom-right.    KIV. The data in a path resource consists of a sequence of 26 byte records.     A. The first two bytes (bytes 0 and 1) of each record are a 16-bit value which indicates the kind of data contained in the rest of the record.     B. If the kind value is 0, 1, or 2, then this record is part of the description of a closed subpath within the compound path.     1. If the kind value is 0, then bytes 2 and 3 of the record contain the length of a closed subpath. Such a record is then followed by records describing the knots of the subpath. This must be the first record in the subpath description.     2. If the kind value is 1 or 2, then the remaining 24 bytes of the record represent three TSPoints giving the control point for the Bezier segment preceding the knot, the anchor point for the knot, and the control point for the Bezier segment leaving the knot in that order.    If the kind value is 1, the control points are linked; i.e., editing one point edits the other one to preserve collinearity. Knots should only be marked as having linked controls if their control points are collinear with their anchor.   YIf the kind value is 2, then this is a knot for which the control points are not linked.  t C. If the kind value is 3, 4, or 5, then this record is part of the description of an open subpath within the compound path. Note that Photoshop 2.0 does not save open subpaths so these values will never arise in a file created by Photoshop 2.0. If it is asked to read a path resource containing such records, it will ignore them, effectively skipping the open path.    [ 1. If the kind value is 3, then this is a path length record just like kind value 0.    y 2. If the kind value is 4, then this record contains the data for a knot with linked controls on the open subpath.    } 3. If the kind value is 5., then this record contains the data for a knot with non-linked control on the open subpath.  DouB@9vjQ!0+u/uASsP%^wzg5AT Tw Ru9c+9vjQ+x`A'ayhOmbPx!9 _H " _ a0 _ ~"_ < H [                                                     _ d \"_ |a0 (_ xa0 4_ LaH @_ \af0 L_ X` X_ l` p_ 4`F $|_ @`R, _`~ $_ ` _ `n  _ 0`zV _ `  _ `S _ `S  _ `S _ `S $^w`6S 0_ `T  <_ ``$ H_ `  T_ `"S `_ h`S l_ `S x_ p`S _ `S _ ` 0_ `~ _ ` 0_ `X _ `  ^wP` V  _ ` J ,_ ` V D_ ` P_ `  h_ ` $t_ (`  _ ,` $_ H` $ _` $_ P`  @_ t`  L_`d X_ ` 0d^wT`F~ ^w`  _`f _` _ T`B _ ` _ $` _ `< _ hZR  6  R